<template>
  <div class="bg-white rounded-lg p-5 h-full">
    <div class="font-bold text-xl mb-4">{{ hospitalInfo.enterpriseName }}</div>
      <div class="mb-4"><span>医疗卫生</span><span>定级医疗机构</span></div>
      <el-descriptions border size="default" :column="2">
        <el-descriptions-item label="所在镇/街道"
          >  {{ hospitalInfo.town }}</el-descriptions-item
        >
        <el-descriptions-item label="联系电话">18100000000</el-descriptions-item>
        <el-descriptions-item label="详细地址" :span="2"> {{ hospitalInfo.addr }}</el-descriptions-item>
       
      </el-descriptions>
      <div class="text-lg my-4 font-bold">处置详情</div>
      <div class="mb-4">处置时间:{{ info? info.handelTime:'' }}</div>
      <div class="flex items-center">
        <div class="mr-4 w-40">院内医疗废物交接单:</div>
        <img v-for="item in receiptList" class=" w-32 h-32 mr-4  rounded-lg " :src="item" alt=""> 
      </div>
      <div class="flex items-center mt-4">
        <div class="mr-4 w-40">医疗废物运转联单:</div>
        <img v-for="item in transportList" class=" w-32 h-32 mr-4  rounded-lg " :src="item" alt=""> 
      </div>
      <hr class="my-4"></hr>
      <el-button @click="goBack" type="primary">返回</el-button>
  </div>
</template>

<script>
import {getWasteDisposalDetailAPI} from '@/api/zhangping/health-care/waste-disposal'
export default {
  
  mixins: [],
  components: {},
  props: {},
  data () {
    return {
      info:null 
    }
  },
  computed: {
    receiptList(){
      return this.info? this.info.receiptUrl.split(','):[]
    },
    transportList(){
      return this.info? this.info.transportUrl.split(','):[]
    },
    hospitalInfo() {
      return this.$store.state.hospital.info; 
    }
  },
  watch: {},
  created () {},
  mounted () {
    this.getInfo()
  },
  methods: {
    getInfo(){
      const id = this.$route.query.id
      getWasteDisposalDetailAPI(id).then(res=>{
        console.log(res)
        if(res.code===200){
          this.info = res.data 
        } 
      })
    },
    goBack(){
      this.$router.back()
    }
  }
}
</script>

<style scoped lang="scss"></style>
